import requests
from config import url_cloud,headers_web
class LaboratorySeat:
    def __int__(self):
        self.url = url_cloud
        self.headers = headers_web

    @classmethod
    def post_checkRemove(cls,url_cloud:str,params=None,headers=headers_web,paramspath=None,json=None):
        '''
        summary:校验是否允许删除实验位信息
        desription:1.云课堂管理端-删除实验位使用
        :param url_cloud:
        :param params:
        :param headers:
        :param paramspath:
        :return:
        '''
        url = url_cloud + f"/teachinglaboratoryapi/v1/laboratorySeat/{paramspath}/checkRemove"
        r = requests.post(url=url,params=params,headers=headers,json=json)
        return r

    @classmethod
    def post_Remove(cls,url_cloud:str,params=None,headers=headers_web,paramspath=None,json=None):
        '''
        summary:删除实验位信息
        desription:1.云课堂管理端-删除实验位使用
        :param url_cloud:
        :param params:
        :param headers:
        :param paramspath:
        :return:
        '''
        url = url_cloud + f"/teachinglaboratoryapi/v1/laboratorySeat/{paramspath}/remove"
        r = requests.post(url=url,params=params,headers=headers,json=json)
        return r